{include file="header.tpl"}
<div class="grid_12">
<h3><a id="toggle_my_practice" href="#" style="font-decoration:none">Moja praktyka<a><img src="images/toggle-small-expand.png" style="float:right;"/></h3>
<div id="my_practice" name="my_practice" class="my_practice">
{if isset($info_practice)}
	<div class="info">
		{$info_practice}
	</div>
{/if}	
{if isset($practiceDetails)}

	{foreach item=p from=$practice}{/foreach}
	{foreach item=c from=$company} {/foreach}
	{foreach item=pe from=$person} {/foreach}
		<h2>Szczegóły praktyki</h2>
				<table class="show_table">
					<tr class="tr_gray">
						<td class="td_left">Data dodania</td>
						<td class="td_right">{$p.add_date}</td>
					</tr>
					<tr>
						<td class="td_left">Od dnia</td>
						<td class="td_right">{$p.date_start}</td>
					</tr>
					<tr class="tr_gray">
						<td class="td_left">Do dnia</td>
						<td class="td_right">{$p.date_end}</td>
					</tr>
					<tr>
						<td class="td_left">Praktyka płatna</td>
						<td class="td_right">{if $p.paid == 1 }TAK {else} NIE {/if}</td>
					</tr>
					<tr class="tr_gray">
						<td class="td_left">Zakres obowiązków</td>
						<td class="td_right">{$p.duties}</td>
					</tr>
					<tr>
						<td class="td_left">Wymagania</td>
						<td class="td_right">{$p.requirements}</td>
					</tr>
					<tr class="tr_gray">
						<td class="td_left">Technologie</td>
						<td class="td_right">{$p.technology}</td>
					</tr>
				</table>	

{/if}
</div>



<h3><a id="toggle_my_data" href="#" style="font-decoration:none">Moje dane<img src="images/toggle-small-expand.png" style="float:right;"/><a></h3>
<div id="my_data" class="my_data">
	{foreach item = student from=$smarty.session.student_info}{/foreach}
		<table class="show_table">
		<tr class="tr_gray">
			<td class="td_left">Imię</td>
			<td class="td_right">{$student.name}</td>
		</tr>
		<tr>
			<td class="td_left">Nazwisko</td>
			<td class="td_right">{$student.surname}</td>
		</tr>
		<tr class="tr_gray">
			<td class="td_left">Email</td>
			<td class="td_right">{$student.email}</td>
		</tr>
		<tr>
			<td class="td_left">Numer albumu</td>
			<td class="td_right">{$student.album_nr}</td>
		</tr>
		<tr class="tr_gray">
			<td class="td_left">Wydział</td>
			<td class="td_right">{$faculty}</td>
		</tr>
		<tr>
			<td class="td_left">Kierunek</td>
			<td class="td_right">{$specialization}</td>
		</tr>	
		</table>

</div>
<h3><a id="toggle_change_data" href="#" style="font-decoration:none">Zmień dane<img src="images/toggle-small-expand.png" style="float:right;"/><a></h3>
<div id="change_data" class="change_data">	
		<label for="change" class="label">Co chcesz zmienić ?</label></td>

		<select id="select_change_data" class="input">
			<option value = "no_choice">-- wybierz --</option>
			<option value = "email">Email</option>
			<option value = "album">Nr albumu</option>
			<option value = "faculty">Wydział i kierunek</option>
			<option value = "password">Hasło</option>
		</select>

		<div id="change_email" class = "change_data_div">
			<form method="post" method="user_panel.php">
				<table>
					<tr>
						<td><label for="new_email" class="label">Nowy email</label></td>
						<td><input type="text" class="input" id="new_email" name="new_email" /></td>
					</tr>
					<tr>
						<td><br/><input type="submit" name="submit_change_email" id="submit_change_email" value="Zmień" class="button" /></td>
						<td></td>
					</tr>
				</table>
			</form>
		</div>
		
		<div id="change_album" class = "change_data_div">
			<form method="post" method="user_panel.php">
				<table>
					<tr>
						<td><label for="new_album" class ="label">Nowy nr albumu</label></td>
						<td><input type="text" class="input" id="new_album" name="new_album" /></td>
					</tr>
					<tr>
						<td><br/><input type="submit" name="submit_change_album" id="submit_change_album" value="Zmień" class="button" /></td>
						<td></td>
					</tr>					
				</table>
			</form>
		</div>
		
		<div id="change_faculty" class = "change_data_div">
			<form method="post" method="user_panel.php">
				<table>
						<tr>
							<td><label for="s_faculty" class="label">Nowy wydział</label></td>
							<td>
								<select id="s_faculty" name="s_faculty" class="select">
									<option selected="selected">--Wybierz wydział--</option>
									{foreach item=faculty from=$faculties}
										<option value="{$faculty.id}">{$faculty.name}</option>
									{/foreach}
								</select>
							</td>
						</tr>
						<tr>
							<td><label for="s_specialization" class="label"> Nowy kierunek</label></td>
							<td>
								<select id="s_specialization" name="s_specialization" class="select">
									<option selected="selected">--Wybierz kierunek--</option>					
								</select>
							</td>
						</tr>	
						<tr>
							<td><br/><input type="submit" name="submit_change_faculty" id="submit_change_faculty" value="Zmień" class="button" /></td>
							<td></td>
						</tr>
					</tr>				
				</table>	
			</form>
		</div>

		<div id="change_password" class = "change_data_div">
			<form method="post" action = "user_panel.php" >
				<table>
					<tr>
						<td><label for="new_password" class="label">Stare hasło</label></td>
						<td><input type="password" class="input" id="old_passwprd" name="old_password" /></td>
					</tr>
					<tr>
						<td><label for="new_password" class="label">Nowe hasło</label></td>
						<td><input type="password" class="input" id="new_passwprd" name="new_password" /></td>
					</tr>

					<tr>
						<td><br/><input type="submit" name="submit_change_password" id="submit_change_password" value="Zmień" class="button" /></td>
						<td></td>
					</tr>
				</table>
			</form>
		</div>

</div>
{if isset($info_change)}
	<div class="info">
		{$info_change}
	</div>
{/if}
</div>
{include file="footer.tpl"}